﻿using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Classification;

namespace Language.Syntax.Colouring
{
    internal class ResolvedClassification
    {
        #region Public Properties

        public IClassificationType Type { get; set; }
        public ITrackingSpan Span { get; set; }

        #endregion Public Properties

        #region Public Methods

        public ClassificationSpan GetClassification( ITextSnapshot snapshot )
        {
            SnapshotSpan span = Span.GetSpan( snapshot );

            return new ClassificationSpan( span, Type );
        }

        #endregion Public Methods
    }
}
